package taskTracker.ui.lite;

import javax.microedition.lcdui.Choice;

public class SelectIndex implements Runnable {
	private final int i;
	private final Choice choice;

	SelectIndex(int i) {
		this.i = i;
		this.choice = null;
	}

	SelectIndex(Choice choice, int i) {
		this.choice = choice;
		this.i = i;
	}
	
	public void run() {
		if (this.choice == null)
			((List)MainScreen.display.getCurrent()).setSelectedIndex(i, true);
		else
			choice.setSelectedIndex(i, true);
	}
}